/**
 * @Author xieha
 * @Email xiehao35755@163.com
 * @Date 2020-02-12 22:49
 */


package com.xh.blog.article.service.impl;

import com.xh.blog.article.model.dto.ArticleRequest;
import com.xh.blog.article.service.ArticleService;
import com.xh.blog.common.wrapper.ResponseWrapper;
import com.xh.blog.user.api.UserInfoApi;
import com.xh.blog.user.model.dto.UserInfoDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by xieha on 2020-02-12.
 */
@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    UserInfoApi userInfoApi;
    @Override
    public Long addArticle(ArticleRequest articleRequest) {
        ResponseWrapper<UserInfoDto> userR = userInfoApi.getUserInfo((long)articleRequest.getUserId());
        UserInfoDto user = userR.getData();
        return user.getId();
    }
}
